
/*
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef NES_H
#define NES_H 1

extern int nodenumber;

extern struct dln *nl;
extern struct dln *wnl;

extern struct dle *el;
extern struct dle *wel;

extern struct usubg *sgl;
extern struct usubg *sglend;

extern void relayout (void);

extern void unode_reset (void);
extern void uedge_reset (void);
extern void usubgraph_reset (void);

extern struct usubg *usubg_new (char *name, struct usubg *rootedon);
extern void usubg_add (struct usubg *subg, struct usubg *rootedon);
extern void usubg_add_node (struct unode *un, struct usubg *rootedon);
extern void usubg_add_edge (struct uedge *ue, struct usubg *rootedon);

extern struct unode *unode_new (char *name);
extern struct unode *unode_new2 (char *name);

extern struct uedge *uedge_new (struct unode *fn, struct unode *tn);
extern struct uedge *uedge_new2 (struct unode *fn, struct unode *tn);

extern void unode_append_nodelist (struct unode *un);
extern void uedge_append_edgelist (struct uedge *ue);

extern void append_wnl (struct dln *dl);
extern void append_wel (struct dle *dl);

extern struct dln *dln_new (struct unode *un);
extern struct dln *dln_new2 (struct unode *un);
extern struct dle *dle_new (struct uedge *ue);
extern struct dle *dle_new2 (struct uedge *ue);

extern void hasinout (void);
extern void singlenodes (void);

#endif

/* End */
